package com.zhonghui.common.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.eshop.domain.BaseDomain;
import com.zhonghui.common.eshopDto.WechatUserDto;

import java.math.BigDecimal;
import java.util.Date;

@TableName(
        value = "eshop_user",
        autoResultMap = true
)
public class ShopUser extends BaseDomain {
    @TableId(
            value = "uid",
            type = IdType.AUTO
    )
    private Long uid;
    private String username;
    private String password;
    private String realName;
    private String birthday;
    private String cardId;
    private String mark;
    private Integer partnerId;
    private Integer groupId;
    private String nickname;
    private String avatar;
    private String phone;
    private String addIp;
    private String lastIp;
    private BigDecimal nowMoney;
    private BigDecimal brokeragePrice;
    private BigDecimal integral;
    private Integer signNum;
    private Integer status;
    private Integer level;
    private Long spreadUid;
    private Date spreadTime;
    private String userType;
    private Integer isPromoter;
    private Integer payCount;
    private Integer spreadCount;
    private String addres;
    private Integer adminid;
    private String loginType;
    @TableField(
            typeHandler = FastjsonTypeHandler.class
    )
    private WechatUserDto wxProfile;

    public void copy(ShopUser source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public static ShopUser.ShopUserBuilder builder() {
        return new ShopUser.ShopUserBuilder();
    }

    public Long getUid() {
        return this.uid;
    }

    public String getUsername() {
        return this.username;
    }

    public String getPassword() {
        return this.password;
    }

    public String getRealName() {
        return this.realName;
    }

    public String getBirthday() {
        return this.birthday;
    }

    public String getCardId() {
        return this.cardId;
    }

    public String getMark() {
        return this.mark;
    }

    public Integer getPartnerId() {
        return this.partnerId;
    }

    public Integer getGroupId() {
        return this.groupId;
    }

    public String getNickname() {
        return this.nickname;
    }

    public String getAvatar() {
        return this.avatar;
    }

    public String getPhone() {
        return this.phone;
    }

    public String getAddIp() {
        return this.addIp;
    }

    public String getLastIp() {
        return this.lastIp;
    }

    public BigDecimal getNowMoney() {
        return this.nowMoney;
    }

    public BigDecimal getBrokeragePrice() {
        return this.brokeragePrice;
    }

    public BigDecimal getIntegral() {
        return this.integral;
    }

    public Integer getSignNum() {
        return this.signNum;
    }

    public Integer getStatus() {
        return this.status;
    }

    public Integer getLevel() {
        return this.level;
    }

    public Long getSpreadUid() {
        return this.spreadUid;
    }

    public Date getSpreadTime() {
        return this.spreadTime;
    }

    public String getUserType() {
        return this.userType;
    }

    public Integer getIsPromoter() {
        return this.isPromoter;
    }

    public Integer getPayCount() {
        return this.payCount;
    }

    public Integer getSpreadCount() {
        return this.spreadCount;
    }

    public String getAddres() {
        return this.addres;
    }

    public Integer getAdminid() {
        return this.adminid;
    }

    public String getLoginType() {
        return this.loginType;
    }

    public WechatUserDto getWxProfile() {
        return this.wxProfile;
    }

    public ShopUser setUid(final Long uid) {
        this.uid = uid;
        return this;
    }

    public ShopUser setUsername(final String username) {
        this.username = username;
        return this;
    }

    public ShopUser setPassword(final String password) {
        this.password = password;
        return this;
    }

    public ShopUser setRealName(final String realName) {
        this.realName = realName;
        return this;
    }

    public ShopUser setBirthday(final String birthday) {
        this.birthday = birthday;
        return this;
    }

    public ShopUser setCardId(final String cardId) {
        this.cardId = cardId;
        return this;
    }

    public ShopUser setMark(final String mark) {
        this.mark = mark;
        return this;
    }

    public ShopUser setPartnerId(final Integer partnerId) {
        this.partnerId = partnerId;
        return this;
    }

    public ShopUser setGroupId(final Integer groupId) {
        this.groupId = groupId;
        return this;
    }

    public ShopUser setNickname(final String nickname) {
        this.nickname = nickname;
        return this;
    }

    public ShopUser setAvatar(final String avatar) {
        this.avatar = avatar;
        return this;
    }

    public ShopUser setPhone(final String phone) {
        this.phone = phone;
        return this;
    }

    public ShopUser setAddIp(final String addIp) {
        this.addIp = addIp;
        return this;
    }

    public ShopUser setLastIp(final String lastIp) {
        this.lastIp = lastIp;
        return this;
    }

    public ShopUser setNowMoney(final BigDecimal nowMoney) {
        this.nowMoney = nowMoney;
        return this;
    }

    public ShopUser setBrokeragePrice(final BigDecimal brokeragePrice) {
        this.brokeragePrice = brokeragePrice;
        return this;
    }

    public ShopUser setIntegral(final BigDecimal integral) {
        this.integral = integral;
        return this;
    }

    public ShopUser setSignNum(final Integer signNum) {
        this.signNum = signNum;
        return this;
    }

    public ShopUser setStatus(final Integer status) {
        this.status = status;
        return this;
    }

    public ShopUser setLevel(final Integer level) {
        this.level = level;
        return this;
    }

    public ShopUser setSpreadUid(final Long spreadUid) {
        this.spreadUid = spreadUid;
        return this;
    }

    public ShopUser setSpreadTime(final Date spreadTime) {
        this.spreadTime = spreadTime;
        return this;
    }

    public ShopUser setUserType(final String userType) {
        this.userType = userType;
        return this;
    }

    public ShopUser setIsPromoter(final Integer isPromoter) {
        this.isPromoter = isPromoter;
        return this;
    }

    public ShopUser setPayCount(final Integer payCount) {
        this.payCount = payCount;
        return this;
    }

    public ShopUser setSpreadCount(final Integer spreadCount) {
        this.spreadCount = spreadCount;
        return this;
    }

    public ShopUser setAddres(final String addres) {
        this.addres = addres;
        return this;
    }

    public ShopUser setAdminid(final Integer adminid) {
        this.adminid = adminid;
        return this;
    }

    public ShopUser setLoginType(final String loginType) {
        this.loginType = loginType;
        return this;
    }

    public ShopUser setWxProfile(final WechatUserDto wxProfile) {
        this.wxProfile = wxProfile;
        return this;
    }

    public ShopUser() {
    }

    public ShopUser(final Long uid, final String username, final String password, final String realName, final String birthday, final String cardId, final String mark, final Integer partnerId, final Integer groupId, final String nickname, final String avatar, final String phone, final String addIp, final String lastIp, final BigDecimal nowMoney, final BigDecimal brokeragePrice, final BigDecimal integral, final Integer signNum, final Integer status, final Integer level, final Long spreadUid, final Date spreadTime, final String userType, final Integer isPromoter, final Integer payCount, final Integer spreadCount, final String addres, final Integer adminid, final String loginType, final WechatUserDto wxProfile) {
        this.uid = uid;
        this.username = username;
        this.password = password;
        this.realName = realName;
        this.birthday = birthday;
        this.cardId = cardId;
        this.mark = mark;
        this.partnerId = partnerId;
        this.groupId = groupId;
        this.nickname = nickname;
        this.avatar = avatar;
        this.phone = phone;
        this.addIp = addIp;
        this.lastIp = lastIp;
        this.nowMoney = nowMoney;
        this.brokeragePrice = brokeragePrice;
        this.integral = integral;
        this.signNum = signNum;
        this.status = status;
        this.level = level;
        this.spreadUid = spreadUid;
        this.spreadTime = spreadTime;
        this.userType = userType;
        this.isPromoter = isPromoter;
        this.payCount = payCount;
        this.spreadCount = spreadCount;
        this.addres = addres;
        this.adminid = adminid;
        this.loginType = loginType;
        this.wxProfile = wxProfile;
    }

    public String toString() {
        return "ShopUser(uid=" + this.getUid() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", realName=" + this.getRealName() + ", birthday=" + this.getBirthday() + ", cardId=" + this.getCardId() + ", mark=" + this.getMark() + ", partnerId=" + this.getPartnerId() + ", groupId=" + this.getGroupId() + ", nickname=" + this.getNickname() + ", avatar=" + this.getAvatar() + ", phone=" + this.getPhone() + ", addIp=" + this.getAddIp() + ", lastIp=" + this.getLastIp() + ", nowMoney=" + this.getNowMoney() + ", brokeragePrice=" + this.getBrokeragePrice() + ", integral=" + this.getIntegral() + ", signNum=" + this.getSignNum() + ", status=" + this.getStatus() + ", level=" + this.getLevel() + ", spreadUid=" + this.getSpreadUid() + ", spreadTime=" + this.getSpreadTime() + ", userType=" + this.getUserType() + ", isPromoter=" + this.getIsPromoter() + ", payCount=" + this.getPayCount() + ", spreadCount=" + this.getSpreadCount() + ", addres=" + this.getAddres() + ", adminid=" + this.getAdminid() + ", loginType=" + this.getLoginType() + ", wxProfile=" + this.getWxProfile() + ")";
    }

    public static class ShopUserBuilder {
        private Long uid;
        private String username;
        private String password;
        private String realName;
        private String birthday;
        private String cardId;
        private String mark;
        private Integer partnerId;
        private Integer groupId;
        private String nickname;
        private String avatar;
        private String phone;
        private String addIp;
        private String lastIp;
        private BigDecimal nowMoney;
        private BigDecimal brokeragePrice;
        private BigDecimal integral;
        private Integer signNum;
        private Integer status;
        private Integer level;
        private Long spreadUid;
        private Date spreadTime;
        private String userType;
        private Integer isPromoter;
        private Integer payCount;
        private Integer spreadCount;
        private String addres;
        private Integer adminid;
        private String loginType;
        private WechatUserDto wxProfile;

        ShopUserBuilder() {
        }

        public ShopUser.ShopUserBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public ShopUser.ShopUserBuilder username(final String username) {
            this.username = username;
            return this;
        }

        public ShopUser.ShopUserBuilder password(final String password) {
            this.password = password;
            return this;
        }

        public ShopUser.ShopUserBuilder realName(final String realName) {
            this.realName = realName;
            return this;
        }

        public ShopUser.ShopUserBuilder birthday(final String birthday) {
            this.birthday = birthday;
            return this;
        }

        public ShopUser.ShopUserBuilder cardId(final String cardId) {
            this.cardId = cardId;
            return this;
        }

        public ShopUser.ShopUserBuilder mark(final String mark) {
            this.mark = mark;
            return this;
        }

        public ShopUser.ShopUserBuilder partnerId(final Integer partnerId) {
            this.partnerId = partnerId;
            return this;
        }

        public ShopUser.ShopUserBuilder groupId(final Integer groupId) {
            this.groupId = groupId;
            return this;
        }

        public ShopUser.ShopUserBuilder nickname(final String nickname) {
            this.nickname = nickname;
            return this;
        }

        public ShopUser.ShopUserBuilder avatar(final String avatar) {
            this.avatar = avatar;
            return this;
        }

        public ShopUser.ShopUserBuilder phone(final String phone) {
            this.phone = phone;
            return this;
        }

        public ShopUser.ShopUserBuilder addIp(final String addIp) {
            this.addIp = addIp;
            return this;
        }

        public ShopUser.ShopUserBuilder lastIp(final String lastIp) {
            this.lastIp = lastIp;
            return this;
        }

        public ShopUser.ShopUserBuilder nowMoney(final BigDecimal nowMoney) {
            this.nowMoney = nowMoney;
            return this;
        }

        public ShopUser.ShopUserBuilder brokeragePrice(final BigDecimal brokeragePrice) {
            this.brokeragePrice = brokeragePrice;
            return this;
        }

        public ShopUser.ShopUserBuilder integral(final BigDecimal integral) {
            this.integral = integral;
            return this;
        }

        public ShopUser.ShopUserBuilder signNum(final Integer signNum) {
            this.signNum = signNum;
            return this;
        }

        public ShopUser.ShopUserBuilder status(final Integer status) {
            this.status = status;
            return this;
        }

        public ShopUser.ShopUserBuilder level(final Integer level) {
            this.level = level;
            return this;
        }

        public ShopUser.ShopUserBuilder spreadUid(final Long spreadUid) {
            this.spreadUid = spreadUid;
            return this;
        }

        public ShopUser.ShopUserBuilder spreadTime(final Date spreadTime) {
            this.spreadTime = spreadTime;
            return this;
        }

        public ShopUser.ShopUserBuilder userType(final String userType) {
            this.userType = userType;
            return this;
        }

        public ShopUser.ShopUserBuilder isPromoter(final Integer isPromoter) {
            this.isPromoter = isPromoter;
            return this;
        }

        public ShopUser.ShopUserBuilder payCount(final Integer payCount) {
            this.payCount = payCount;
            return this;
        }

        public ShopUser.ShopUserBuilder spreadCount(final Integer spreadCount) {
            this.spreadCount = spreadCount;
            return this;
        }

        public ShopUser.ShopUserBuilder addres(final String addres) {
            this.addres = addres;
            return this;
        }

        public ShopUser.ShopUserBuilder adminid(final Integer adminid) {
            this.adminid = adminid;
            return this;
        }

        public ShopUser.ShopUserBuilder loginType(final String loginType) {
            this.loginType = loginType;
            return this;
        }

        public ShopUser.ShopUserBuilder wxProfile(final WechatUserDto wxProfile) {
            this.wxProfile = wxProfile;
            return this;
        }

        public ShopUser build() {
            return new ShopUser(this.uid, this.username, this.password, this.realName, this.birthday, this.cardId, this.mark, this.partnerId, this.groupId, this.nickname, this.avatar, this.phone, this.addIp, this.lastIp, this.nowMoney, this.brokeragePrice, this.integral, this.signNum, this.status, this.level, this.spreadUid, this.spreadTime, this.userType, this.isPromoter, this.payCount, this.spreadCount, this.addres, this.adminid, this.loginType, this.wxProfile);
        }

        public String toString() {
            return "ShopUser.ShopUserBuilder(uid=" + this.uid + ", username=" + this.username + ", password=" + this.password + ", realName=" + this.realName + ", birthday=" + this.birthday + ", cardId=" + this.cardId + ", mark=" + this.mark + ", partnerId=" + this.partnerId + ", groupId=" + this.groupId + ", nickname=" + this.nickname + ", avatar=" + this.avatar + ", phone=" + this.phone + ", addIp=" + this.addIp + ", lastIp=" + this.lastIp + ", nowMoney=" + this.nowMoney + ", brokeragePrice=" + this.brokeragePrice + ", integral=" + this.integral + ", signNum=" + this.signNum + ", status=" + this.status + ", level=" + this.level + ", spreadUid=" + this.spreadUid + ", spreadTime=" + this.spreadTime + ", userType=" + this.userType + ", isPromoter=" + this.isPromoter + ", payCount=" + this.payCount + ", spreadCount=" + this.spreadCount + ", addres=" + this.addres + ", adminid=" + this.adminid + ", loginType=" + this.loginType + ", wxProfile=" + this.wxProfile + ")";
        }
    }
}
